StkAwayTktGateway
StkAwayTktGateway inserts are validated and convered to away SpdrParentExecution records and published. If successfully published they will be visible in the SpdrParentExecution table and on SpiderRock GUI tools. Replaces are allowed but they are functionally identical to updates in that only the fillPrice and fillQuantity fields are actually changed.
METADATA
Attribute | Value |
---|---|
Topic | 5120-srse-gateway |
MLink Token | Internal |
Product | SRTrade |
accessType | SELECT,UPDATE,INSERT,DELETE |
Table Definition
Field | Type | Key | Default Value | Comment |
---|---|---|---|---|
accnt | VARCHAR(16) | PRI | '' | |
clientFillID | BIGINT | PRI | 0 | client execution ID these must be unique on a peraccount basis copied into SpdrParentExecutionaltFillId |
clientFirm | VARCHAR(16) | PRI | '' | |
clientOrderID | VARCHAR(24) | '' | client orderID copied into SpdrParentExecutionaltOrderId | |
riskGroupId | CHAR(19) | '0000-0000-0000-0000' | riskGroupId for this execution report | |
ticker_at | enum - AssetType | 'None' | ||
ticker_ts | enum - TickerSrc | 'None' | ||
ticker_tk | VARCHAR(12) | '' | ||
fillSide | enum - BuySell | 'None' | ||
fillPrice | DOUBLE | 0 | ||
fillQuantity | INT | 0 | ||
fillRefUPrc | DOUBLE | 0 | reference underlier price fill arrival time | |
ssaleFlag | enum - ShortSaleFlag | 'None' | ||
deliverExecReport | enum - YesNo | 'No' | Drop a copy of the execution report | |
SRfillID | BIGINT | 0 | SR internal fill number any values submitted will be overwritten by the SR generated fill number | |
comment | VARCHAR(64) | '' | text comment if any | |
execBrkr | VARCHAR(12) | '' | client external exec broker code | |
userData1 | TINYTEXT | '' | client supplied data field passes through to parent and child executions and reports as well as FIX drops | |
userData2 | TINYTEXT | '' | client supplied data field passes through to parent and child executions and reports as well as FIX drops | |
strategy | VARCHAR(36) | '' | clientsupplied strategy string | |
fillDttm | DATETIME(6) | '1900-01-01' | ||
timestamp | DATETIME(6) | '1900-01-01 00:00:00.000000' | ||
checksum | TINYINT UNSIGNED | 0 | Must be set to 13 This helps detect some columnvalue misalignments |
PRIMARY KEY DEFINITION (Unique)
Field | Sequence |
---|---|
accnt | 1 |
clientFillID | 2 |
clientFirm | 3 |
CREATE TABLE EXAMPLE QUERY
CREATE TABLE `SRTrade`.`MsgStkAwayTktGateway` (
`accnt` VARCHAR(16) NOT NULL DEFAULT '',
`clientFillID` BIGINT NOT NULL DEFAULT 0 COMMENT 'client execution ID, these must be unique on a per-account basis [copied into SpdrParentExecution.altFillId]',
`clientFirm` VARCHAR(16) NOT NULL DEFAULT '',
`clientOrderID` VARCHAR(24) NOT NULL DEFAULT '' COMMENT 'client orderID [copied into SpdrParentExecution.altOrderId]',
`riskGroupId` CHAR(19) NOT NULL DEFAULT '0000-0000-0000-0000' COMMENT 'riskGroupId for this execution report',
`ticker_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None',
`ticker_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None',
`ticker_tk` VARCHAR(12) NOT NULL DEFAULT '',
`fillSide` ENUM('None','Buy','Sell') NOT NULL DEFAULT 'None',
`fillPrice` DOUBLE NOT NULL DEFAULT 0,
`fillQuantity` INT NOT NULL DEFAULT 0,
`fillRefUPrc` DOUBLE NOT NULL DEFAULT 0 COMMENT 'reference underlier price @ fill arrival time',
`ssaleFlag` ENUM('None','Long','Short','Exempt','Cover','NA') NOT NULL DEFAULT 'None',
`deliverExecReport` ENUM('Yes','No') NOT NULL DEFAULT 'No' COMMENT 'Drop a copy of the execution report',
`SRfillID` BIGINT NOT NULL DEFAULT 0 COMMENT 'SR internal fill number, any values submitted will be overwritten by the SR generated fill number',
`comment` VARCHAR(64) NOT NULL DEFAULT '' COMMENT 'text comment (if any)',
`execBrkr` VARCHAR(12) NOT NULL DEFAULT '' COMMENT 'client (external) exec broker code',
`userData1` TINYTEXT NOT NULL DEFAULT '' COMMENT 'client supplied data field; passes through to parent and child executions and reports as well as FIX drops',
`userData2` TINYTEXT NOT NULL DEFAULT '' COMMENT 'client supplied data field; passes through to parent and child executions and reports as well as FIX drops',
`strategy` VARCHAR(36) NOT NULL DEFAULT '' COMMENT 'client-supplied strategy string',
`fillDttm` DATETIME(6) NOT NULL DEFAULT '1900-01-01',
`timestamp` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000',
`checksum` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Must be set to 13. This helps detect some column,value misalignments.',
CONSTRAINT nonnegative_riskGroupId CHECK(ASCII(riskGroupId) < 56),
PRIMARY KEY USING HASH (`accnt`,`clientFillID`,`clientFirm`)
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='StkAwayTktGateway inserts are validated and convered to away SpdrParentExecution records and published. If successfully published they will be visible in the SpdrParentExecution table and on SpiderRock GUI tools.\nReplaces are allowed but they are functionally identical to updates in that only the fillPrice and fillQuantity fields are actually changed.';
SELECT TABLE EXAMPLE QUERY
SELECT
`accnt`,
`clientFillID`,
`clientFirm`,
`clientOrderID`,
`riskGroupId`,
`ticker_at`,
`ticker_ts`,
`ticker_tk`,
`fillSide`,
`fillPrice`,
`fillQuantity`,
`fillRefUPrc`,
`ssaleFlag`,
`deliverExecReport`,
`SRfillID`,
`comment`,
`execBrkr`,
`userData1`,
`userData2`,
`strategy`,
`fillDttm`,
`timestamp`,
`checksum`
FROM `SRTrade`.`MsgStkAwayTktGateway`
WHERE
/* Replace with a VARCHAR(16) */
`accnt` = 'Example_accnt'
AND
/* Replace with a BIGINT */
`clientFillID` = 1234567890
AND
/* Replace with a VARCHAR(16) */
`clientFirm` = 'Example_clientFirm';
UPDATE TABLE EXAMPLE QUERY
UPDATE `SRTrade`.`MsgStkAwayTktGateway`
SET
/* Replace with a VARCHAR(24) */
`clientOrderID` = 'Example_clientOrderID',
/* Replace with a CHAR(19) */
`riskGroupId` = 'Example_riskGroupId',
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`ticker_at` = 'None',
/* Replace with a ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') */
`ticker_ts` = 'None',
/* Replace with a VARCHAR(12) */
`ticker_tk` = 'Example_ticker_tk',
/* Replace with a ENUM('None','Buy','Sell') */
`fillSide` = 'None',
/* Replace with a DOUBLE */
`fillPrice` = 4.56,
/* Replace with a INT */
`fillQuantity` = 5,
/* Replace with a DOUBLE */
`fillRefUPrc` = 4.56,
/* Replace with a ENUM('None','Long','Short','Exempt','Cover','NA') */
`ssaleFlag` = 'None',
/* Replace with a ENUM('Yes','No') */
`deliverExecReport` = 'No',
/* Replace with a BIGINT */
`SRfillID` = 1234567890,
/* Replace with a VARCHAR(64) */
`comment` = 'Example_comment',
/* Replace with a VARCHAR(12) */
`execBrkr` = 'Example_execBrkr',
/* Replace with a TINYTEXT */
`userData1` = 'dummy tiny text',
/* Replace with a TINYTEXT */
`userData2` = 'dummy tiny text',
/* Replace with a VARCHAR(36) */
`strategy` = 'Example_strategy',
/* Replace with a DATETIME(6) */
`fillDttm` = '2022-01-01 12:34:56.000000',
/* Replace with a DATETIME(6) */
`timestamp` = '2022-01-01 12:34:56.000000',
/* Replace with a TINYINT UNSIGNED */
`checksum` = 1
WHERE
/* Replace with a VARCHAR(16) */
`accnt` = 'Example_accnt'
AND
/* Replace with a BIGINT */
`clientFillID` = 1234567890
AND
/* Replace with a VARCHAR(16) */
`clientFirm` = 'Example_clientFirm';
INSERT TABLE EXAMPLE QUERY
INSERT INTO `SRTrade`.`MsgStkAwayTktGateway`(
/* Replace with a VARCHAR(16) */
`accnt`,
/* Replace with a BIGINT */
`clientFillID`,
/* Replace with a VARCHAR(16) */
`clientFirm`,
/* Replace with a VARCHAR(24) */
`clientOrderID`,
/* Replace with a CHAR(19) */
`riskGroupId`,
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`ticker_at`,
/* Replace with a ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') */
`ticker_ts`,
/* Replace with a VARCHAR(12) */
`ticker_tk`,
/* Replace with a ENUM('None','Buy','Sell') */
`fillSide`,
/* Replace with a DOUBLE */
`fillPrice`,
/* Replace with a INT */
`fillQuantity`,
/* Replace with a DOUBLE */
`fillRefUPrc`,
/* Replace with a ENUM('None','Long','Short','Exempt','Cover','NA') */
`ssaleFlag`,
/* Replace with a ENUM('Yes','No') */
`deliverExecReport`,
/* Replace with a BIGINT */
`SRfillID`,
/* Replace with a VARCHAR(64) */
`comment`,
/* Replace with a VARCHAR(12) */
`execBrkr`,
/* Replace with a TINYTEXT */
`userData1`,
/* Replace with a TINYTEXT */
`userData2`,
/* Replace with a VARCHAR(36) */
`strategy`,
/* Replace with a DATETIME(6) */
`fillDttm`,
/* Replace with a DATETIME(6) */
`timestamp`,
/* Replace with a TINYINT UNSIGNED */
`checksum`
)
VALUES(
'Example_accnt',
1234567890,
'Example_clientFirm',
'Example_clientOrderID',
'Example_riskGroupId',
'None',
'None',
'Example_ticker_tk',
'None',
4.56,
5,
4.56,
'None',
'No',
1234567890,
'Example_comment',
'Example_execBrkr',
'dummy tiny text',
'dummy tiny text',
'Example_strategy',
'2022-01-01 12:34:56.000000',
'2022-01-01 12:34:56.000000',
1
);
DELETE TABLE EXAMPLE QUERY
DELETE FROM `SRTrade`.`MsgStkAwayTktGateway`
WHERE
/* Replace with a VARCHAR(16) */
`accnt` = 'Example_accnt'
AND
/* Replace with a BIGINT */
`clientFillID` = 1234567890
AND
/* Replace with a VARCHAR(16) */
`clientFirm` = 'Example_clientFirm';
Doc Columns Query
SELECT * FROM SRTrade.doccolumns WHERE TABLE_NAME='StkAwayTktGateway' ORDER BY ordinal_position ASC;